﻿@model First_AG.Models.EmailModels

@{
    ViewBag.Title = "First Assembly of God";
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Thanks</title>
</head>
<body>
    <div class="content">


    <!--Email sender-->
    @{
        try
        {
            WebMail.SmtpServer = "smtp.gmail.com";
            WebMail.EnableSsl = true;
            WebMail.SmtpPort = 587;
            WebMail.SmtpUseDefaultCredentials = false;
            WebMail.UserName = "firstassemblyofgodweb@gmail.com";
            WebMail.Password = "realpassword";
            WebMail.From = "firstassemblyofgodweb@gmail.com";

            WebMail.Send(
                to: "patrick.dolan@selu.edu", //put your email here to see it work
                subject: "Testing",
                body: Model.Message
                );
        }
        catch (Exception)
        {
            @:<b> Sorry - Something went wrong. Please contact First Assembly and tell them about this problem</b>
        }
    }
</div>
</body>
</html>
